package game.actions;

import root.GridOfWords;
import root.Word;
import algos.Action;
import algos.ContextStack;
import game.Grid;

/**
 *
 * @author nicolas
 */
public class PlaceWordAction implements Action<GridOfWords> {

	protected Word w;
	protected String word;
	
	public PlaceWordAction(Word _w, String _word) {
		word = _word;
		w = _w;
	}
	
	@Override
	public GridOfWords applyOn(ContextStack<GridOfWords> context) {
		return context.currentContext().write(w, word);
	}
	
}
